﻿using System;

namespace MoreExtentions
{
    public static partial class Linq
    {
        public static TResult IfNotNull<TValue, TResult>(this TValue t, Func<TValue, TResult> fn) where TValue : class
        {
            return t == null ? default(TResult) : fn(t);
        }
    }
}